/**
 * 
 */
package com.mvc.controller.xt;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mvc.model.base.Json;
import com.mvc.model.xt.Reservation;
import com.mvc.service.xt.ReservationService;

/**
 * 预约信息控制器
 * @author qingjie
 *
 */
@Controller
@RequestMapping("/reservation")
public class ReservationController {
	
	@Autowired
	private ReservationService rs;
	
	@RequestMapping("/find")
	@ResponseBody
	public Json find(Reservation reservation){
		Json j = new Json();
		List<Reservation> list = rs.findReservations(reservation);
		if(list.size()>0){
			j.setMsg("数据已经处理！");
			j.setSuccess(true);
			j.setObj(list);
		}else{
			j.setMsg("数据为空");
			j.setSuccess(false);
		}
		return j;
	}

}
